﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="publishers.aspx.vb" Inherits="GLOBALDATABASE.WebForm6" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
    DataKeyNames="pub_id" DataSourceID="SqlDataSource1">
    <Columns>
        <asp:BoundField DataField="pub_id" HeaderText="pub_id" ReadOnly="True" 
            SortExpression="pub_id" />
        <asp:BoundField DataField="pub_name" HeaderText="pub_name" 
            SortExpression="pub_name" />
        <asp:BoundField DataField="city" HeaderText="city" SortExpression="city" />
        <asp:BoundField DataField="state" HeaderText="state" SortExpression="state" />
        <asp:BoundField DataField="country" HeaderText="country" 
            SortExpression="country" />
    </Columns>
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" 
    ConnectionString="<%$ ConnectionStrings:pubsConnectionString6 %>" 
    DeleteCommand="DELETE FROM [publishers] WHERE [pub_id] = @pub_id" 
    InsertCommand="INSERT INTO [publishers] ([pub_id], [pub_name], [city], [state], [country]) VALUES (@pub_id, @pub_name, @city, @state, @country)" 
    SelectCommand="SELECT * FROM [publishers]" 
    UpdateCommand="UPDATE [publishers] SET [pub_name] = @pub_name, [city] = @city, [state] = @state, [country] = @country WHERE [pub_id] = @pub_id">
    <DeleteParameters>
        <asp:Parameter Name="pub_id" Type="String" />
    </DeleteParameters>
    <InsertParameters>
        <asp:Parameter Name="pub_id" Type="String" />
        <asp:Parameter Name="pub_name" Type="String" />
        <asp:Parameter Name="city" Type="String" />
        <asp:Parameter Name="state" Type="String" />
        <asp:Parameter Name="country" Type="String" />
    </InsertParameters>
    <UpdateParameters>
        <asp:Parameter Name="pub_name" Type="String" />
        <asp:Parameter Name="city" Type="String" />
        <asp:Parameter Name="state" Type="String" />
        <asp:Parameter Name="country" Type="String" />
        <asp:Parameter Name="pub_id" Type="String" />
    </UpdateParameters>
</asp:SqlDataSource>
</asp:Content>
